/*
 * @Author: 轻语
 * @Date: 2021-12-30 14:39:26
 * @LastEditors: 轻语
 * @LastEditTime: 2021-12-30 14:45:50
 * @Description: 
 */
import { post, get } from '@/api/fetch'

const map = new Map([
  ['login', [get, 'api/user/login', true]],
  ['registered', [post, 'api/user/registered']]
])


const API = {}
for (let [key, [http, k, isMock = false]] of map) {
  API[key] = (params) => {
    return http(`fb-budget-service/${k}`, { params, isMock })
  }
}

export default API
